package com.changgou.goods.dao;

import com.changgou.goods.pojo.Template;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/****
 * @Author:www.itheima.com
 * @Description:Template的Dao
 * @Date www.itheima.com
 *****/
public interface TemplateMapper extends Mapper<Template> {

    /**
     * 根据三级分类id查询对应分类模板
     * @param cid
     * @return
     */
    @Select("SELECT  tt.* FROM tb_category tc,tb_template tt WHERE tc.template_id=tt.id AND tc.id=#{cid}")
    Template findByCid(@Param("cid") Integer cid);
}
